Optimal. Leaf size=137 \[ -\frac {B n}{4 b (a+b x)^2}+\frac {B d n}{2 b (b c-a d) (a+b x)}+\frac {B d^2 n \log (a+b x)}{2 b (b c-a d)^2}-\frac {B d^2 n \log (c+d x)}{2 b (b c-a d)^2}-\frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b (a+b x)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2548, 46}
\begin {gather*} -\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{2 b (a+b x)^2}+\frac {B d^2 n \log (a+b x)}{2 b (b c-a d)^2}-\frac {B d^2 n \log (c+d x)}{2 b (b c-a d)^2}+\frac {B d n}{2 b (a+b x) (b c-a d)}-\frac {B n}{4 b (a+b x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 2548
Rubi steps
\begin {align*} \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^3} \, dx &=\int \left (\frac {A}{(a+b x)^3}+\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^3}\right ) \, dx\\ &=-\frac {A}{2 b (a+b x)^2}+B \int \frac {\log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(a+b x)^3} \, dx\\ &=-\frac {A}{2 b (a+b x)^2}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b (a+b x)^2}+\frac {(B (b c-a d) n) \int \frac {1}{(a+b x)^3 (c+d x)} \, dx}{2 b}\\ &=-\frac {A}{2 b (a+b x)^2}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b (a+b x)^2}+\frac {(B (b c-a d) n) \int \left (\frac {b}{(b c-a d) (a+b x)^3}-\frac {b d}{(b c-a d)^2 (a+b x)^2}+\frac {b d^2}{(b c-a d)^3 (a+b x)}-\frac {d^3}{(b c-a d)^3 (c+d x)}\right ) \, dx}{2 b}\\ &=-\frac {A}{2 b (a+b x)^2}-\frac {B n}{4 b (a+b x)^2}+\frac {B d n}{2 b (b c-a d) (a+b x)}+\frac {B d^2 n \log (a+b x)}{2 b (b c-a d)^2}-\frac {B d^2 n \log (c+d x)}{2 b (b c-a d)^2}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{2 b (a+b x)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 132, normalized size = 0.96 \begin {gather*} -\frac {-2 B d^2 n (a+b x)^2 \log (a+b x)+2 B d^2 n (a+b x)^2 \log (c+d x)+(b c-a d) \left (2 A (b c-a d)+B n (b c-3 a d-2 b d x)+2 B (b c-a d) \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )}{4 b (b c-a d)^2 (a+b x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.32, size = 1379, normalized size = 10.07
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1379\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 235, normalized size = 1.72 \begin {gather*} \frac {1}{4} \, {\left (\frac {2 \, d^{2} n e \log \left (b x + a\right )}{b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}} - \frac {2 \, d^{2} n e \log \left (d x + c\right )}{b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}} + \frac {2 \, b d n x e - {\left (b c n - 3 \, a d n\right )} e}{a^{2} b^{2} c - a^{3} b d + {\left (b^{4} c - a b^{3} d\right )} x^{2} + 2 \, {\left (a b^{3} c - a^{2} b^{2} d\right )} x}\right )} B e^{\left (-1\right )} - \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )}{2 \, {\left (b^{3} x^{2} + 2 \, a b^{2} x + a^{2} b\right )}} - \frac {A}{2 \, {\left (b^{3} x^{2} + 2 \, a b^{2} x + a^{2} b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 274 vs.
\(2 (128) = 256\).
time = 0.35, size = 274, normalized size = 2.00 \begin {gather*} -\frac {2 \, {\left (A + B\right )} b^{2} c^{2} - 4 \, {\left (A + B\right )} a b c d + 2 \, {\left (A + B\right )} a^{2} d^{2} - 2 \, {\left (B b^{2} c d - B a b d^{2}\right )} n x + {\left (B b^{2} c^{2} - 4 \, B a b c d + 3 \, B a^{2} d^{2}\right )} n - 2 \, {\left (B b^{2} d^{2} n x^{2} + 2 \, B a b d^{2} n x - {\left (B b^{2} c^{2} - 2 \, B a b c d\right )} n\right )} \log \left (b x + a\right ) + 2 \, {\left (B b^{2} d^{2} n x^{2} + 2 \, B a b d^{2} n x - {\left (B b^{2} c^{2} - 2 \, B a b c d\right )} n\right )} \log \left (d x + c\right )}{4 \, {\left (a^{2} b^{3} c^{2} - 2 \, a^{3} b^{2} c d + a^{4} b d^{2} + {\left (b^{5} c^{2} - 2 \, a b^{4} c d + a^{2} b^{3} d^{2}\right )} x^{2} + 2 \, {\left (a b^{4} c^{2} - 2 \, a^{2} b^{3} c d + a^{3} b^{2} d^{2}\right )} x\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.14, size = 239, normalized size = 1.74 \begin {gather*} \frac {B d^{2} n \log \left (b x + a\right )}{2 \, {\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )}} - \frac {B d^{2} n \log \left (d x + c\right )}{2 \, {\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )}} - \frac {B n \log \left (b x + a\right )}{2 \, {\left (b^{3} x^{2} + 2 \, a b^{2} x + a^{2} b\right )}} + \frac {B n \log \left (d x + c\right )}{2 \, {\left (b^{3} x^{2} + 2 \, a b^{2} x + a^{2} b\right )}} + \frac {2 \, B b d n x - B b c n + 3 \, B a d n - 2 \, A b c - 2 \, B b c + 2 \, A a d + 2 \, B a d}{4 \, {\left (b^{4} c x^{2} - a b^{3} d x^{2} + 2 \, a b^{3} c x - 2 \, a^{2} b^{2} d x + a^{2} b^{2} c - a^{3} b d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.66, size = 192, normalized size = 1.40 \begin {gather*} -\frac {\frac {2\,A\,a\,d-2\,A\,b\,c+3\,B\,a\,d\,n-B\,b\,c\,n}{2\,\left (a\,d-b\,c\right )}+\frac {B\,b\,d\,n\,x}{a\,d-b\,c}}{2\,a^2\,b+4\,a\,b^2\,x+2\,b^3\,x^2}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{2\,b\,\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}-\frac {B\,d^2\,n\,\mathrm {atanh}\left (\frac {2\,b^3\,c^2-2\,a^2\,b\,d^2}{2\,b\,{\left (a\,d-b\,c\right )}^2}-\frac {2\,b\,d\,x}{a\,d-b\,c}\right )}{b\,{\left (a\,d-b\,c\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________